pretty_array

This module provides a function for pretty-printing D arrays of various dimensions. A multidimensional array is represented as a 2D matrix surrounded by nested square frames. If the array is too big, it will be truncated accordingly. The surrounding frame, and the truncation symbol can be changed as well as truncation options.

Members

Functions

getShape
ulong[] getShape(T obj, ulong[] dims = null)

Get the shape of a plain D array. A standalone convenience function for getting array shape without converting to Mir Slices. The array must have correct dimensions otherwise the column index will not be consistent.

prettyArr
string prettyArr(T arr)

Pretty-print D array.

Manifest constants

INF
enum INF;

TODO: a placeholder string for Infs

NAN
enum NAN;

TODO: a placeholder string for NaNs

Meta